<?php

	if ($_POST['txt_url']){
            
		$token = $_COOKIE['token'];
		
		include("config/bdd.php");
		mysql_query("INSERT INTO URL(origin, microurl, token, clic) VALUES ('".mysql_real_escape_string($_POST['txt_url'])."', '".basename(tempnam("", ""))."', ".$token.", 0)");
		
		header("Location: ../index.php");
	}

?>